Student Solution

-->

"Education is the most powerful weapon which you can use to change the world”
– Nelson Mandela

1 University

1 Course

2 Subjects

Module 6 Project 1

Module 6 Project 1

Q Competencies In this project, you will demonstrate your mastery of the following competencies: • Create a structured database through the use of relational concepts • Implement basic processing functionalities to create new structured database environments Step One: Scenario You’re working as a database administrator for Quantigration, a networking equipment manufacturer. The company has grown quickly, and it’s still figuring out its internal business processes. Customer return merchandise authorizations (RMAs) are used to track shipments for defective or incorrect parts. The company has identified RMAs as a specific problematic area. Your supervisor at Quantigration asked you to create a database for a new software application that will be used for processing RMAs. Because there are several locations where merchandise can be taken in, the application must also record where items are received. This system will also capture where the equipment is going next: repair, scrap, or refurbishing and resale. The warehouse shipping and receiving employees at your company will be using this application; they are considered your “end users” for the application. Part of their job is to process customer return shipments. This involves the following steps: • Assess the quality of the items being returned for defects • Identify missing parts • Identify signs of obvious wear and tear (such as dents or scratches to the equipment) Step One: Directions Create a Database The data architect on your DevOps team has come to you with a logical database diagram referred to as an entity relationship diagram (ERD). This is documentation of the tables, their relationships to each other, their attributes, and any primary or foreign keys on those attributes. These elements are required to create the new database. Prior to beginning, review the example ERD in the Quantigration RMA Diagram document in Supporting Materials. Create your three tables, named Customers, Orders, and RMA, in the QuantigrationUpdates database based on the example you‘ve been given. To do this, complete the following steps and place your work in the provided Database Documentation Template: 1. Navigate to your online integrated development environment (IDE). The next set of steps will help you write SQL commands to create tables that demonstrate relationships based on the ERD. 2. Create a database schema called QuantigrationUpdates that will hold tables by using SQL commands. List it out to the screen. 3. Using the ERD as a reference, create the following tables with the appropriate attributes and keys: o A table to store customer information with a primary key of Customer ID o A table to store order information with a primary key of Order ID and a foreign key of Customer ID o A table to store RMA information with a primary key of RMA ID and a foreign key of Order ID STOP: Make sure to save your work before moving on to Step Two of this process. You’ll continue to work in Codio and use the documentation you started in Step One. Step Two: Scenario Now it’s time to populate the database with records and run some basic queries against those tables. You’ll be using the QuantigrationUpdates database and the three tables you created in Step One to do the following: • Import data from the CSV data files into the tables • Perform queries against those tables • Create an output listing to the screen of the query results The shipping and receiving team that you are working with has been keeping records of their RMAs in spreadsheets, and your team has been creating its database in MySQL. The information that they have is detailed and won’t need cleaning. The data in the tables can be exported to CSV files. The data should also align with the columns and data types in your tables. Step Two: Directions Load and Query the Data In Step One, you created a customer RMA database using SQL to create tables and placed your work in the database documentation template. To complete your objectives in this step, continue to place your work in the database documentation template and follow these directions: • Please note before you begin that the three data files being used for this project are preloaded into Codio: o RMA.csv o Customers.csv o Orders.csv 1. 1. 1. Import the data from each file into tables. a. Use the QuantigrationUpdates database, the three tables you created, and the three CSV files preloaded into Codio. ? Use the import utility of your database program to load the data from each file into the table of the same name. You’ll perform this step three times, once for each table. 2. Write basic queries against imported tables to organize and analyze targeted data. For each query, include a screenshot of the query and its output. You should also include a 1- to 3-sentence description of the output. ? ? Write an SQL query that returns the count of orders for customers located only in the city of Framingham, Massachusetts. i. This query will use a table join between the Customers and Orders tables. The query will also use a WHERE clause. ii. How many records were returned? ? Write an SQL query to select all of the customers located in the state of Massachusetts. i. Use a WHERE clause to limit the number of records in the customers table to only those who are located in Massachusetts. ii. Record an answer to the following question: How many records were returned? ? Write an SQL query to insert four new records into the orders and customers tables using the following data: Customers Table CustomerID FirstName LastName StreetAddress City State ZipCode Telephone 100004 Luke Skywalker 15 Maiden Lane New York NY 10222 212-555-1234 100005 Winston Smith 123 Sycamore Street Greensboro NC 27401 919-555-6623 100006 MaryAnne Jenkins 1 Coconut Way Jupiter FL 33458 321-555-8907 100007 Janet Williams 55 Redondo Beach Blvd Torrence CA 90501 310-555-5678 ? Orders Table OrderID CustomerID SKU Description 1204305 100004 ADV-24-10C Advanced Switch 10GigE Copper 24 port 1204306 100005 ADV-48-10F Advanced Switch 10 GigE Copper/Fiber 44 port copper 4 port fiber 1204307 100006 ENT-24-10F Enterprise Switch 10GigE SFP+ 24 Port 1204308 100007 ENT-48-10F Enterprise Switch 10GigE SFP+ 48 port ? ? In the Customers table, perform a query to count all records where the city is Woonsocket, Rhode Island. ? How many records are in the customers table where the field "city" equals "Woonsocket"? ? In the RMA database, update a customer's records. ? Write an SQL statement to select the current fields of status and step for the record in the RMA table with an OrderID value of "5175." ? What are the current status and step? ? Write an SQL statement to update the status and step for the OrderID, 5175 to status = "Complete" and step = "Credit Customer Account." ? What are the updated status and step values for this record? Provide a screenshot of your work. ? Delete RMA records. ? Write an SQL statement to delete all records with a reason of "Rejected". ? How many records were deleted? Provide a screenshot of your work. 3. Because of a new company branding initiative, you’ve been asked to change the name of the “Customer” to “Collaborator.” Update your existing table using SQL based on this change in requirements. Copy and paste the SQL you write to do the following: . Rename all instances of “Customer” to “Collaborator.” 4. Create an output file of the required query results. Write an SQL statement to list the contents of the Orders table and send the output to a file that has a .csv extension. 5. What to Submit To complete this project, you must submit the following: Database Documentation Complete and submit the Database Documentation Template. This will be where you capture the work that you’ve done in both Step One and Step Two. Follow the specific instructions for the directions outlined here and within the template itself. Supporting Materials The CSV data files that you’ll be working with can be found in Codio. They are listed vertically in the left pane of your Codio web interface. The following resource(s) may support your work on the project: Document: Database Documentation Template Example As you complete your database documentation template, refer to this document for an example of how to insert screenshots to capture your work. Document: Quantigration RMA Diagram This ERD shows the relationships of entities in the database. Download this ERD and use it to support your work on this project. A text version of the diagram is available: Quantigration RMA Diagram Text Version. Project One Rubric Criteria Exemplary Proficient Needs Improvement Not Evident Value Write SQL Commands to Create Tables Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%) Writes SQL commands to create tables that demonstrate relationships based on the ERD (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include inaccuracies in the SQL and tables (55%) Does not attempt criterion (0%) 25 Create a Database Schema N/A Creates schema that will hold tables by using SQL commands (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include schema that do not hold tables (55%) Does not attempt criterion (0%) 10 Update Existing Table Using SQL N/A Updates existing table using SQL based on change in requirements (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include addition of incorrect data in updates (55%) Does not attempt criterion (0%) 15 Import Data Into Tables Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%) Imports new data into tables and modifies existing records in tables (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include additional detail in importing and modifying data (55%) Does not attempt criterion (0%) 10 Write Basic Queries Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%) Writes basic queries against imported tables to organize and analyze targeted data (85%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include level of detail of queries (55%) Does not attempt criterion (0%) 20 Create Output File N/A Creates an output file of the required query results (100%) Shows progress toward proficiency, but with errors or omissions; areas for improvement may include inaccuracies in the output file of query results (55%) Does not attempt criterion (0%) 10 Articulation of Response (Descriptions Only) Exceeds proficiency in an exceptionally clear, insightful, sophisticated, or creative manner (100%) Clearly conveys meaning with correct grammar, sentence structure, and spelling, demonstrating an understanding of audience and purpose (85%) Shows progress toward proficiency, but with errors in grammar, sentence structure, and spelling, negatively impacting readability (55%) Submission has critical errors in grammar, sentence structure, and spelling, preventing understanding of ideas (0%) 10 Total: 100%

View Related Questions

Solution Preview

DAD 220 Database Documentation Template Complete these steps as you work through the directions for Project One. Replace the bracketed text with your screenshots and brief explanations of the work they capture. Each screenshot and its explanation should be sized to approximately one quarter of the page, with the description written below the screenshot. Follow these rules for each of the prompts and questions below. Review the example document located in the Project One Supporting Materials for assistance. Step One: Create a Database